<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<title>用户 - ${user.nickname!}</title>
	<meta name="keywords" content="${user.nickname!},主页"/>
	<meta name="description" content="${user.nickname!}的个人页面"/>
	<@tools.includePlace path="/76c53ac2-4f88-4ef3-984b-c81d00a48089.html"/> <#-- 头部Header -->
</head>
<body>
	<@tools.includePlace path="/23e95a91-0063-4498-99ef-aa3fc4a79c4c.html"/> <#-- 导航 -->
	<main>
		<div class="container clearfix-after">
			<h1><a href="${site.dynamicPath}member/user.html?id=${user.id}">${user.nickname!}的个人页面</a><#if user.superuser>[管理员]</#if></h1>
			<div class="comment-box">
				<@cms.commentList contentId=contentId userId=user.id pageIndex=pageIndex pageSize=10>
					<@import path="/ftl/tools.ftl" namespace="t"/><#-- 工具 -->
					<#list page.list as a>
						<@t.merge 'userIds' a.replyUserId!/>
						<@t.merge 'contentIds' a.contentId!/>
					</#list>
					<@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
					<@cms.content ids=t.contentIds!><#assign contentMap=map!/></@cms.content>
					<#if page.totalCount gt 0>
						<h3>内容评论</h3>
						<ul>
							<#list page.list as a>
							<li class="underline">
								<p>${a.createDate?string('yyyy-MM-dd hh:mm')} 评论《<a href="${contentMap[a.contentId?string].url}" target="_blank">${contentMap[a.contentId?string].title}</a>》</p>
								<#if a.replyId?has_content>
									<@cms.comment id=a.replyId>
										<p class="reply"><a href="${site.dynamicPath}member/user.html?id=${a.replyUserId!}" target="_blank">@${userMap[a.replyUserId?string].nickname}</a> : ${object.text!}</p>
									</@cms.comment>
								</#if>
								<p>${a.text!}</p>
							</li>
							</#list>
						</ul>
					</#if>
					<#if page??>
					<div class="page">
						<#if !page.firstPage>
						<a href="${site.dynamicPath}member/user.html?id=${user.id!}&pageIndex=${page.prePage}">上一页</a>
						<#else>
						<span>上一页</span>
						</#if>
						<#assign start=1/>
						<#if (page.pageIndex-5) gt start>
						<#assign start=page.pageIndex-4/>
						</#if>
						<#assign end=page.totalPage/>
						<#if (page.pageIndex+5) lt end>
						<#assign end=page.pageIndex+4/>
						</#if>
						<#if start gt 1>
						<a href="${site.dynamicPath}member/user.html?id=${user.id!}&pageIndex=1">1</a> ...
						</#if>
						<#list start..end as n><a href="${site.dynamicPath}member/user.html?id=${user.id!}&pageIndex=${n}"<#if n=page.pageIndex> class="selected"</#if>>${n}</a></#list>
						<#if end lt page.totalPage>
						... <a href="${site.dynamicPath}member/user.html?id=${user.id!}&pageIndex=${page.totalPage}">${page.totalPage}</a>
						</#if>
						<#if !page.lastPage>
						<a href="${site.dynamicPath}member/user.html?id=${user.id!}&pageIndex=${page.nextPage}">下一页</a>
						<#else>
						<span>下一页</span>
						</#if>
					</div>
					</#if>
				</@cms.commentList>
			</div>
		</div>
	</main>
	<script>
		var templatePath='${.current_template_name?keep_after('/')}';
		var itemString="itemType=user&itemId=${user.id}";
	</script>
	<@tools.includePlace path="/cc29e896-332a-46d8-9bcb-d48e92144e9c.html"/> <#-- 尾部Footer -->
</body>
</html>
